home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume6 / animal < prev    next >
Encoding:
Internet Message Format  |  1989-03-22  |  16.0 KB

  1. Path: uunet!tektronix!tekgen!tekred!games
  2. From: games@tekred.CNA.TEK.COM
  3. Newsgroups: comp.sources.games
  4. Subject: v06i031:  animal - guess the object game for SysV or BSD
  5. Message-ID: <3748@tekred.CNA.TEK.COM>
  6. Date: 21 Mar 89 20:13:00 GMT
  7. Sender: billr@tekred.CNA.TEK.COM
  8. Lines: 764
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: stacey@hcrvax.UUCP
  12. Posting-number: Volume 6, Issue 31
  13. Archive-name: animal
  14.  
  15.     [[This is a C implementation of the ``guess the animal'' game.
  16.       It uses curses(3X) for the user interface, it was developed
  17.       on Unix SysV.3 then ported to BSD and SysV.2.]]
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of shell archive."
  26. # Contents:  Makefile README an.c scr.c animal.6 example
  27. # Wrapped by billr@saab on Tue Mar 21 11:10:44 1989
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'Makefile'\"
  31. else
  32. echo shar: Extracting \"'Makefile'\" \(548 characters\)
  33. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  34. X# Animal - makefile
  35. X#
  36. X# System Dependencies - edit as appropriate for your machine
  37. X#
  38. X
  39. X# Unix System 5.3
  40. X
  41. XCFLAGS= -O
  42. XLIBS= -lcurses
  43. X
  44. X# BSD
  45. X#
  46. X#CFLAGS= -O -DBOGUS_GET -DBOGUS_BOX
  47. X#LIBS= -lcurses -ltermcap
  48. X#
  49. X
  50. X# Unix System 5.2 (possibly other less advanced SysV ports)
  51. X#
  52. X#CFLAGS= -O -DBOGUS_GET -DBOGUS_BOX
  53. X#LIBS= -lcurses
  54. X#
  55. X
  56. XLDFLAGS= -O
  57. XOBJS= an.o scr.o
  58. XSRC= an.c scr.c
  59. XEXE= animal
  60. X
  61. X$(EXE): $(OBJS)
  62. X    cc $(LDFLAGS) $(OBJS) -o $(EXE) $(LIBS)
  63. X
  64. Xshar:
  65. X    xshar -v README animal.6 Makefile $(SRC) example > $(EXE).shar
  66. X
  67. Xman:
  68. X    nroff -man animal.6 > $(EXE).man
  69. END_OF_FILE
  70. if test 548 -ne `wc -c <'Makefile'`; then
  71.     echo shar: \"'Makefile'\" unpacked with wrong size!
  72. fi
  73. # end of 'Makefile'
  74. fi
  75. if test -f 'README' -a "${1}" != "-c" ; then 
  76.   echo shar: Will not clobber existing file \"'README'\"
  77. else
  78. echo shar: Extracting \"'README'\" \(1105 characters\)
  79. sed "s/^X//" >'README' <<'END_OF_FILE'
  80. XThis is a C implementation of the ``guess the animal'' game.
  81. XIt uses curses(3X) for the user interface and standard buffered
  82. XI/O routines for the file interface.
  83. X
  84. XThis version of the program has been ported to a Sun running BSD,
  85. XSystem 5.3 on a VAX, Interactive's 386/ix port of System 5.3 and
  86. XVX/VE System 5.2 running on a CDC Cyber.
  87. X
  88. XAn example file is included with the source and can be used by
  89. Xthe command:
  90. X
  91. X$ animal example
  92. X
  93. XThe program will look the best on System 5.3 Unix, and the
  94. Xworst on BSD.  I'll fix any bugs people have, I don't
  95. Xconsider the BSD curses library routines to be bugs per se
  96. X(so don't complain to me about them).
  97. X
  98. XThe first time I ever saw this game was on an ancient DECUS
  99. Xtape, it was a FORTRAN implementation.  Since then I have
  100. Xwritten a VAX Pascal version (1983), a C64 Basic version (1982),
  101. Xand a VMS DCL version (1985) (recently posted to alt.sources).
  102. X
  103. XPLEASE: take time to edit the Makefile for your machine.
  104. XBefore you go rushing off to post on the net complaining
  105. Xthat something doesn't work make some attempt to fix the
  106. Xproblem yourself, it may even be your fault!
  107. END_OF_FILE
  108. if test 1105 -ne `wc -c <'README'`; then
  109.     echo shar: \"'README'\" unpacked with wrong size!
  110. fi
  111. # end of 'README'
  112. fi
  113. if test -f 'an.c' -a "${1}" != "-c" ; then 
  114.   echo shar: Will not clobber existing file \"'an.c'\"
  115. else
  116. echo shar: Extracting \"'an.c'\" \(5668 characters\)
  117. sed "s/^X//" >'an.c' <<'END_OF_FILE'
  118. X/*
  119. X * Animal - copyright HCR Corporation, Toronto, Canada, 1989
  120. X *
  121. X * author: Stacey Campbell
  122. X */
  123. X
  124. X#include <stdio.h>
  125. X#include <string.h>
  126. X
  127. X#define YES_ANS 1
  128. X#define NO_ANS 0
  129. X#define BAD_FILE 0
  130. X#define BAD_OPTS 1
  131. X#define BOTTOM "$$"
  132. X
  133. Xtypedef struct node_t {
  134. X    char *question;
  135. X    struct node_t *yes_p;
  136. X    struct node_t *no_p;
  137. X    } node_t;
  138. X
  139. Xmain(argc, argv)
  140. X
  141. Xint argc;
  142. Xchar *argv[];
  143. X
  144. X    {
  145. X    node_t *top;
  146. X    char buf[256];
  147. X    node_t *InitTop();
  148. X    node_t *LoadFile();
  149. X    void Query();
  150. X    int KeepGoing();
  151. X    void Usage();
  152. X    void SaveAnimals();
  153. X    void InitCurses();
  154. X    void EndCurses();
  155. X    void PutFileMsg();
  156. X    void PutMsg();
  157. X
  158. X    InitCurses();
  159. X    switch (argc)
  160. X        {
  161. X        case 1 :
  162. X        top = InitTop();
  163. X        break;
  164. X        case 2 :
  165. X        top = LoadFile(argv[1]);
  166. X        if (top == 0)
  167. X            Usage(BAD_FILE, argv[1]);
  168. X        sprintf(buf, "using datafile: %s", argv[1]);
  169. X        PutFileMsg(buf);
  170. X        break;
  171. X        default :
  172. X        Usage(BAD_OPTS, argv[0]);
  173. X        break;
  174. X        }
  175. X
  176. X    do    {
  177. X        PutMsg("Think of something...");
  178. X        Query(top);
  179. X        } while (KeepGoing() == YES_ANS);
  180. X
  181. X    SaveAnimals(top);
  182. X    EndCurses();
  183. X    return 0;
  184. X    }
  185. X
  186. Xstatic void SaveAnimals(top)
  187. X
  188. Xnode_t *top;
  189. X
  190. X    {
  191. X    char fn[256];
  192. X    char buf[256];
  193. X    int GetAnswer();
  194. X    void DumpAnimals();
  195. X    char *FileQuestion();
  196. X    FILE *fp;
  197. X
  198. X    
  199. X    if (YesNo(FileQuestion("Do want to save the data?")) == NO_ANS)
  200. X        return;
  201. X    do    {
  202. X        strcpy(fn, FileQuestion("input a datafile name:"));
  203. X        if ((fp = fopen(fn, "w")) == NULL)
  204. X            {
  205. X            sprintf(buf, "Cannot open %s, try again?", fn);
  206. X            if (YesNo(FileQuestion(buf)) == NO_ANS)
  207. X                return;
  208. X            }
  209. X        } while (fp == NULL);
  210. X    DumpAnimals(fp, top);
  211. X    fclose(fp);
  212. X    }
  213. X
  214. Xstatic void DumpAnimals(fp, node_p)
  215. X
  216. XFILE *fp;
  217. Xnode_t *node_p;
  218. X
  219. X    {
  220. X    if (node_p == 0)
  221. X        fprintf(fp, "%s\n", BOTTOM);
  222. X    else
  223. X        {
  224. X        fprintf(fp, "%s\n", node_p->question);
  225. X        DumpAnimals(fp, node_p->yes_p);
  226. X        DumpAnimals(fp, node_p->no_p);
  227. X        }
  228. X    }
  229. X
  230. Xstatic node_t *LoadFile(fn)
  231. X
  232. Xchar *fn;
  233. X
  234. X    {
  235. X    FILE *fp;
  236. X    node_t *top;
  237. X    void CollectAnimals();
  238. X
  239. X    if ((fp = fopen(fn, "r")) == NULL)
  240. X        return 0;
  241. X    CollectAnimals(fp, &top);
  242. X    fclose(fp);
  243. X    return top;
  244. X    }
  245. X
  246. Xstatic void CollectAnimals(fp, node_pp)
  247. X
  248. XFILE *fp;
  249. Xnode_t **node_pp;
  250. X
  251. X    {
  252. X    static char read_buf[256];
  253. X    node_t *GetNode();
  254. X
  255. X    if (fgets(read_buf, 256, fp) == NULL)
  256. X        return;
  257. X    read_buf[strlen(read_buf) - 1] = '\0';
  258. X    if (strcmp(read_buf, BOTTOM) == 0)
  259. X        return;
  260. X    else
  261. X        {
  262. X        *node_pp = GetNode(read_buf);
  263. X        CollectAnimals(fp, &(*node_pp)->yes_p);
  264. X        CollectAnimals(fp, &(*node_pp)->no_p);
  265. X        }
  266. X    }
  267. X
  268. Xstatic void Usage(status, str)
  269. X
  270. Xint status;
  271. Xchar *str;
  272. X
  273. X    {
  274. X    char buf[256];
  275. X    void PutFileMsg();
  276. X    void EndCurses();
  277. X
  278. X    switch (status)
  279. X        {
  280. X        case BAD_FILE :
  281. X        sprintf(buf, "Cannot open datafile: %s", str);
  282. X        PutFileMsg(buf);
  283. X        break;
  284. X        case BAD_OPTS :
  285. X        default :
  286. X        sprintf(buf, "Usage: %s {data-file}", str);
  287. X        PutFileMsg(buf);
  288. X        break;
  289. X        }
  290. X    EndCurses();
  291. X    exit(1);
  292. X    }
  293. X
  294. Xstatic node_t *InitTop()
  295. X
  296. X    {
  297. X    node_t *top;
  298. X    char fn[256];
  299. X    node_t *GetNode();
  300. X    char *FileQuestion();
  301. X    node_t *LoadFile();
  302. X    void Usage();
  303. X    int YesNo();
  304. X    
  305. X    if (YesNo(FileQuestion("Do you wish to read a datafile?")) == YES_ANS)
  306. X        {
  307. X        strcpy(fn, FileQuestion("Name of datafile?"));
  308. X        top = LoadFile(fn);
  309. X        if (top == 0)
  310. X            Usage(BAD_FILE, fn);
  311. X        }
  312. X    else
  313. X        {
  314. X        top = GetNode("was or is it a living organism");
  315. X        top->yes_p = GetNode("an ant");
  316. X        top->no_p = GetNode("a concrete brick");
  317. X        }
  318. X    return top;
  319. X    }
  320. X
  321. Xstatic void Query(node_p)
  322. X
  323. Xnode_t *node_p;
  324. X
  325. X    {
  326. X    int GetAnswer();
  327. X    void NewAnimal();
  328. X    void PutQuestion();
  329. X    void PutFinalQuestion();
  330. X    void PutMsg();
  331. X
  332. X    if (node_p->yes_p)
  333. X        {
  334. X        PutQuestion(node_p->question);
  335. X        if (GetAnswer() == YES_ANS)
  336. X            Query(node_p->yes_p);
  337. X        else
  338. X            Query(node_p->no_p);
  339. X        }
  340. X    else
  341. X        {
  342. X        PutFinalQuestion(node_p->question);
  343. X        if (GetAnswer() == YES_ANS)
  344. X            PutMsg("Yay!");
  345. X        else
  346. X            NewAnimal(node_p);
  347. X        }
  348. X    }
  349. X
  350. Xstatic void NewAnimal(node_p)
  351. X
  352. Xnode_t *node_p;
  353. X
  354. X    {
  355. X    char animal[256];
  356. X    char question[256];
  357. X    char buf[256];
  358. X    node_t *old_object, *new_query, *new_object;
  359. X    char *malloc();
  360. X    node_t *GetNode();
  361. X    int GetAnswer();
  362. X    void GetQuestLine();
  363. X    void PutMsg();
  364. X    void PutQuestion();
  365. X
  366. X    old_object = (node_t *) malloc(sizeof(node_t));
  367. X    *old_object = *node_p;
  368. X    GetQuestLine("What are you thinking of?", animal);
  369. X    new_object = GetNode(animal);
  370. X    PutMsg("Type a question such that:");
  371. X    PutMsg("  (a) a yes or no answer would distinguish");
  372. X    sprintf(buf, "      between %s and %s", animal, node_p->question);
  373. X    PutMsg(buf);
  374. X    PutMsg("and");
  375. X    PutMsg("  (b) it does not explicitly mention either of these things.");
  376. X    GetQuestLine("question:", question);
  377. X    new_query = GetNode(question);
  378. X    *node_p = *new_query;
  379. X    
  380. X    sprintf(buf, "For %s the answer would be", animal);
  381. X    PutQuestion(buf);
  382. X    if (GetAnswer() == YES_ANS)
  383. X        {
  384. X        node_p->yes_p = new_object;
  385. X        node_p->no_p = old_object;
  386. X        }
  387. X    else
  388. X        {
  389. X        node_p->yes_p = old_object;
  390. X        node_p->no_p = new_object;
  391. X        }
  392. X    }
  393. X
  394. Xstatic int GetAnswer()
  395. X
  396. X    {
  397. X    char input[256];
  398. X    void GetQuestLine();
  399. X    int YesNo();
  400. X    
  401. X    GetQuestLine("", input);
  402. X    return YesNo(input);
  403. X    }
  404. X
  405. Xstatic int YesNo(str)
  406. X
  407. Xchar *str;
  408. X
  409. X    {
  410. X    int ret_val;
  411. X    void ToLower();
  412. X    
  413. X    ToLower(str);
  414. X    if (strcmp(str, "yes") == 0 || strcmp(str, "y") == 0)
  415. X        ret_val = YES_ANS;
  416. X    else
  417. X        ret_val = NO_ANS;
  418. X
  419. X    return ret_val;
  420. X    }
  421. X
  422. Xstatic int KeepGoing()
  423. X
  424. X    {
  425. X    void PutQuestion();
  426. X    int GetAnswer();
  427. X    void StartBold();
  428. X    void EndBold();
  429. X
  430. X    StartBold();
  431. X    PutQuestion("Another query");
  432. X    EndBold();
  433. X    return GetAnswer();
  434. X    }
  435. X
  436. Xvoid ToLower(str)
  437. X
  438. Xchar *str;
  439. X
  440. X    {
  441. X    while (*str)
  442. X        {
  443. X        if (*str >= 'A' && *str <= 'Z')
  444. X            *str += 'a' - 'A';
  445. X        str++;
  446. X        }
  447. X    }
  448. X
  449. Xnode_t *GetNode(question)
  450. X
  451. Xchar *question;
  452. X
  453. X    {
  454. X    node_t *node_p;
  455. X    char *malloc();
  456. X
  457. X    if ((node_p = (node_t *) malloc(sizeof(node_t))) == NULL)
  458. X        return NULL;
  459. X    node_p->question = malloc(strlen(question) + 2);
  460. X    strcpy(node_p->question, question);
  461. X    node_p->yes_p = 0;
  462. X    node_p->no_p = 0;
  463. X    return node_p;
  464. X    }
  465. END_OF_FILE
  466. if test 5668 -ne `wc -c <'an.c'`; then
  467.     echo shar: \"'an.c'\" unpacked with wrong size!
  468. fi
  469. # end of 'an.c'
  470. fi
  471. if test -f 'scr.c' -a "${1}" != "-c" ; then 
  472.   echo shar: Will not clobber existing file \"'scr.c'\"
  473. else
  474. echo shar: Extracting \"'scr.c'\" \(2285 characters\)
  475. sed "s/^X//" >'scr.c' <<'END_OF_FILE'
  476. X/*
  477. X * Animal - copyright HCR Corporation, Toronto, Canada, 1989
  478. X *
  479. X * author: Stacey Campbell
  480. X */
  481. X
  482. X#include <curses.h>
  483. X
  484. X#define HEAD "Animal"
  485. X
  486. Xstatic WINDOW *Header;
  487. Xstatic WINDOW *FileMsg;
  488. Xstatic WINDOW *QuestAns;
  489. Xstatic WINDOW *QuestAnsBorder;
  490. X
  491. Xvoid InitCurses()
  492. X
  493. X    {
  494. X    initscr();
  495. X#ifdef BOGUS_ECHO
  496. X    echo();
  497. X#endif
  498. X    werase(stdscr);
  499. X#ifdef BOGUS_BOX
  500. X    box(stdscr, '|', '-');
  501. X#else
  502. X    box(stdscr, 0, 0);
  503. X#endif
  504. X    wrefresh(stdscr);
  505. X    Header = newwin(1, COLS - 2, 1, 1);
  506. X    wstandout(Header);
  507. X    mvwaddstr(Header, 0, (COLS - 2) / 2 - sizeof(HEAD) / 2 - 1, HEAD);
  508. X    wstandend(Header);
  509. X    wrefresh(Header);
  510. X    FileMsg = newwin(3, COLS - 2, 2, 1);
  511. X#ifdef BOGUS_BOX
  512. X    box(FileMsg, '|', '-');
  513. X#else
  514. X    box(FileMsg, 0, 0);
  515. X#endif
  516. X    QuestAnsBorder = newwin(LINES - 6, COLS - 2, 5, 1);
  517. X#ifdef BOGUS_BOX
  518. X    box(QuestAnsBorder, '|', '-');
  519. X#else
  520. X    box(QuestAnsBorder, 0, 0);
  521. X#endif
  522. X    QuestAns = newwin(LINES - 8, COLS - 4, 6, 2);
  523. X    wmove(QuestAns, 0, 0);
  524. X    scrollok(QuestAns, TRUE);
  525. X    idlok(QuestAns, TRUE);
  526. X    wrefresh(FileMsg);
  527. X    wrefresh(QuestAnsBorder);
  528. X    wrefresh(QuestAns);
  529. X    return;
  530. X    }
  531. X
  532. Xchar *FileQuestion(prompt)
  533. X
  534. Xchar *prompt;
  535. X
  536. X    {
  537. X    static char answer[256];
  538. X
  539. X    werase(FileMsg);
  540. X#ifdef BOGUS_BOX
  541. X    box(FileMsg, '|', '-');
  542. X#else
  543. X    box(FileMsg, 0, 0);
  544. X#endif
  545. X    mvwaddstr(FileMsg, 1, 1, prompt);
  546. X    waddch(FileMsg, ' ');
  547. X#ifdef BOGUS_GET
  548. X    wrefresh(FileMsg);
  549. X#endif
  550. X    wgetstr(FileMsg, answer);
  551. X    return answer;
  552. X    }
  553. X
  554. Xvoid PutFileMsg(str)
  555. X
  556. Xchar *str;
  557. X
  558. X    {
  559. X    werase(FileMsg);
  560. X#ifdef BOGUS_BOX
  561. X    box(FileMsg, '|', '-');
  562. X#else
  563. X    box(FileMsg, 0, 0);
  564. X#endif
  565. X    mvwaddstr(FileMsg, 1, 1, str);
  566. X    wrefresh(FileMsg);
  567. X    }
  568. X
  569. Xvoid EndCurses()
  570. X
  571. X    {
  572. X    delwin(Header);
  573. X    delwin(FileMsg);
  574. X    delwin(QuestAns);
  575. X    delwin(QuestAnsBorder);
  576. X    endwin();
  577. X    }
  578. X
  579. Xvoid PutQuestion(question)
  580. X
  581. Xchar *question;
  582. X
  583. X    {
  584. X    wprintw(QuestAns, "%s?", question);
  585. X    }
  586. X
  587. Xvoid PutFinalQuestion(question)
  588. X
  589. Xchar *question;
  590. X
  591. X    {
  592. X    char buf[256];
  593. X    void PutQuestion();
  594. X
  595. X    strcpy(buf, "final guess: is it ");
  596. X    strcat(buf, question);
  597. X    PutQuestion(buf);
  598. X    }
  599. X
  600. Xvoid PutMsg(msg)
  601. X
  602. Xchar *msg;
  603. X
  604. X    {
  605. X    waddstr(QuestAns, msg);
  606. X    waddch(QuestAns, '\n');
  607. X    }
  608. X
  609. Xvoid GetQuestLine(prompt, reply)
  610. X
  611. Xchar *prompt;
  612. Xchar *reply;
  613. X
  614. X    {
  615. X    wprintw(QuestAns, "%s ", prompt);
  616. X#ifdef BOGUS_GET
  617. X    wrefresh(QuestAns);
  618. X#endif
  619. X    wgetstr(QuestAns, reply);
  620. X    }
  621. X
  622. Xvoid StartBold()
  623. X
  624. X    {
  625. X    wstandout(QuestAns);
  626. X    }
  627. X
  628. Xvoid EndBold()
  629. X
  630. X    {
  631. X    wstandend(QuestAns);
  632. X    }
  633. END_OF_FILE
  634. if test 2285 -ne `wc -c <'scr.c'`; then
  635.     echo shar: \"'scr.c'\" unpacked with wrong size!
  636. fi
  637. # end of 'scr.c'
  638. fi
  639. if test -f 'animal.6' -a "${1}" != "-c" ; then 
  640.   echo shar: Will not clobber existing file \"'animal.6'\"
  641. else
  642. echo shar: Extracting \"'animal.6'\" \(2040 characters\)
  643. sed "s/^X//" >'animal.6' <<'END_OF_FILE'
  644. X.TH Animal 6l
  645. X.SH NAME
  646. XAnimal \- the classic game of animal
  647. X.SH SYNOPSIS
  648. X.B animal
  649. X.B [database]
  650. X.SH DESCRIPTION
  651. X.I Animal
  652. Xis an implementation of the ``guess the animal'' game,
  653. Xan assignment given to most first year computer science students.
  654. XThis version uses curses(3X) to give a reasonable interface,
  655. Xand can read and save a database of questions and objects.
  656. X.PP
  657. XThe basic idea of the game is to think of an object
  658. Xthen answer ``yes or no'' questions
  659. Xuntil the program has a final guess at what you are thinking
  660. Xof.  If it is correct then you will be convinced that there
  661. Xmay be something to AI after all.  If it is incorrect you are
  662. Xexpected to provide a question that, when asked, will yeild
  663. Xa yes or no answer that will allow the computer to distinguish
  664. Xbetween its last guess and the correct object. For example if
  665. Xits last guess is Ronald Reagan but you were thinking of a gnat,
  666. Xthen a suitable question would be 'Is it an insect?'.  For RR
  667. Xthe answer would be no, for a gnat the answer would be yes.
  668. X.PP
  669. XHints on choosing good questions: 
  670. X(a) keep the questions as general as possible,
  671. X(b) never explicitly refer to either of the objects in your question, and
  672. X(c) all questions can only have a yes or no answer, so avoid questions
  673. Xthat could produce a ``maybe'' answer.
  674. X.PP
  675. XAt the end of the game you will be asked if you want to save
  676. Xthe information you have added.  A text file with a name
  677. Xof your choosing will be created, and can be used as an argument
  678. Xfor later invocations of
  679. X.I animal.
  680. X.SH BUGS
  681. XUnknown, but please send bug problems to {utzoo,utcsri,lsuc}!hcr!stacey.
  682. X.SH AUTHOR
  683. XStacey Campbell \- HCR Corporation, Toronto, Canada, 1989.
  684. X.SH DISCLAIMER
  685. XAnimal is copyright 1989 by HCR Corporation, Toronto, Ontario, Canada.
  686. XPermission to use, copy, modify, and distribute this software and
  687. Xits documentation for any purpose and without fee is hereby
  688. Xgranted, provided that the above copyright notice appear in all
  689. Xcopies.
  690. X.PP
  691. XHCR  Corporation  disclaims all  warranties with regard to
  692. Xthis software. Use at your own risk.
  693. END_OF_FILE
  694. if test 2040 -ne `wc -c <'animal.6'`; then
  695.     echo shar: \"'animal.6'\" unpacked with wrong size!
  696. fi
  697. # end of 'animal.6'
  698. fi
  699. if test -f 'example' -a "${1}" != "-c" ; then 
  700.   echo shar: Will not clobber existing file \"'example'\"
  701. else
  702. echo shar: Extracting \"'example'\" \(861 characters\)
  703. sed "s/^X//" >'example' <<'END_OF_FILE'
  704. Xwas or is it a living organism
  705. Xis it a human
  706. Xis it female (for sex-less object answer no)
  707. Xis she a well known politician
  708. XIndira Ghandi
  709. X$$
  710. X$$
  711. XElizabeth Taylor
  712. X$$
  713. X$$
  714. Xwas it born in the USA
  715. XRonald Reagan
  716. X$$
  717. X$$
  718. XPierre Burton
  719. X$$
  720. X$$
  721. Xis it an insect
  722. Xdoes it construct underground dwellings
  723. Xan ant
  724. X$$
  725. X$$
  726. Xa bush fly
  727. X$$
  728. X$$
  729. XRoger the Magic Llama
  730. X$$
  731. X$$
  732. Xis it generally used for consuming beverages
  733. Xis it constructed of ceramic
  734. XStacey's coffee cup
  735. X$$
  736. X$$
  737. Xa beer glass
  738. X$$
  739. X$$
  740. Xcan a normal human touch it
  741. Xdoes it consist mainly of paper
  742. Xis a different version produced at least 6 days a week
  743. Xthe New York Times
  744. X$$
  745. X$$
  746. Xa Sears catalog
  747. X$$
  748. X$$
  749. Xis it mainly used for medicinal reasons
  750. Xa box of Sucrets
  751. X$$
  752. X$$
  753. Xdoes it require electricity to operate usefully
  754. Xis it a micro computer of some description
  755. Xan IBM PC
  756. X$$
  757. X$$
  758. Xa VAX 750 computer
  759. X$$
  760. X$$
  761. Xa concrete brick
  762. X$$
  763. X$$
  764. XAlpha Centauri
  765. X$$
  766. X$$
  767. END_OF_FILE
  768. if test 861 -ne `wc -c <'example'`; then
  769.     echo shar: \"'example'\" unpacked with wrong size!
  770. fi
  771. # end of 'example'
  772. fi
  773. echo shar: End of shell archive.
  774. exit 0
  775.